package com.wsx;

import com.wsx.entity.Dish;
import com.wsx.mapper.DishMapper;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.math.BigDecimal;

@SpringBootTest
public class testBigDecimal {
    @Autowired
    private DishMapper dishMapper;
    @Test
    void test(){
        Dish dish = dishMapper.selectDishById(1601172326513266689L);
        System.out.println(dish);
        BigDecimal price = dish.getPrice();
        System.out.println(price);

    }
    @Test
    void test1(){
        Dish dish = new Dish();
        BigDecimal decimal = new BigDecimal(20.00);
        dish.setPrice(decimal);
        System.out.println(dish);
    }
}
